Skip to content

docs: add T component granularity guidance#173

Open
moss-bryophyta wants to merge 1 commit intomainfrom
dx-feedback/t-granularity-guidance
Open

docs: add T component granularity guidance#173
moss-bryophyta wants to merge 1 commit intomainfrom
dx-feedback/t-granularity-guidance

Conversation

@moss-bryophyta
Copy link
Copy Markdown
Collaborator

DX Feedback Loop — Run 3 (2026-03-22)

What triggered this

A naive sub-agent migrating an existing React app to gt-react wasn't sure how granularly to wrap content with <T> — should each paragraph be wrapped? Each section? The whole page? The docs say "you can wrap as much or as little as you want" but don't give clear guidance on the tradeoffs.

What this PR does

Adds a "How much to wrap in a single <T>" section to the <T> component guide template (which generates docs for both gt-next and gt-react). Includes:

  • Good examples (logical content blocks, independent cards)
  • Bad examples (too narrow fragments, wrapping entire page)
  • Rule of thumb and explanation of why wider wrapping gives better translations

Why it matters

This is one of the first decisions developers make after learning about <T>. Without guidance, some wrap every sentence individually (fragmenting translations) while others wrap too much (making maintenance hard). Clear guidance here prevents both failure modes.

@moss-bryophyta moss-bryophyta requested a review from a team as a code owner March 22, 2026 20:04
@moss-bryophyta moss-bryophyta enabled auto-merge (squash) March 22, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant